DISCUSSION
The
ATSUSetFontFallbacks function indicates the fonts to search and the search order to use when a font does not have all the glyphs for the characters it is trying to draw. If you do not call
ATSUSetFontFallbacks, all valid fonts on the user's system will be searched sequentially when a substitute font is needed, and the first match will be used. You can specify this default search behavior by passing
kATSUDefaultFontFallbacks in the
iFontFallbackMethod parameter. This is equivalent to calling the function
ATSUMatchFontsToText.
ATSUSetFontFallbacks will use the first valid font it finds in the font list you specify.
If you call
ATSUSetFontFallbacks and carefully order your chosen font fallbacks, the amount of time needed by ATSUI to find a suitable fallback for specific text can be significantly reduced.